package flag的基本使用

import (
	"flag"
	"fmt"
	"os"
)

func main(){
	fmt.Println(os.Args)
	port:=flag.Int("p",5000,"这个是设置端口值的")
	Ip:=flag.String("i","127.0.0.1","这个是设计ip地址")
	money:=flag.Float64("f",1.02,"这个是设置钱财的")

	flag.Parse()

	fmt.Printf("port:%d\n",*port)
	fmt.Printf("ip:%i\n",*Ip)
	fmt.Printf("money:%f\n",*money)
	fmt.Print(flag.Args())
}
